//
//  GHZiXunYiShi.m
//  guahao
//
//  Created by osx on 16/9/25.
//  Copyright © 2016年 osx. All rights reserved.
//

#import "GHZiXunYiShi.h"
#import <RongIMKit/RongIMKit.h>
#import "GHTalkWithDoctor.h"
#import "GHTalkList.h"
#import "DktCellModel.h"
#import "GHNetWorkTools.h"

@interface GHZiXunYiShi()<RCIMUserInfoDataSource>

@end


@implementation GHZiXunYiShi

-(void)viewDidLoad{
    [super viewDidLoad];
    
    
 


}

- (void)getUserInfoWithUserId:(NSString *)userId
                   completion:(void (^)(RCUserInfo *userInfo))completion{
    
    RCUserInfo *user = [[RCUserInfo alloc] init];
    
    
    
    NSString *urlstr = @"doctor";
    NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:userId,@"doctorid", nil];
    NSLog(@"%@",urlstr);
    [[GHNetWorkTools sharedTools] requestDataWith:GET urlString:urlstr parameters:dict finishedBlock:^(id result, NSError *error) {
        NSLog(@"%@",result);
        
       
        DktCellModel *doctor = [[DktCellModel alloc] init];
        doctor = [result valueForKey:@"Doctor"];
        user.userId = [NSString stringWithFormat:@"%ld",doctor.doctorid] ;
        user.name = doctor.DoctorName;
        NSLog(@"---------------pppp");
        return completion(user);
        
    }];

    
    
    
    
}



@end


